﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;
using System.Collections.Generic;
using SLControlLibrary.Resources.Controls.Calendar.Common;

namespace SLControlLibrary.Resources.Controls.Calendar.ClassicCalendar.ViewModel
{
    public class CalendarVM : INotifyPropertyChanged
    {
        #region Variables
        private double _ControlHeight = 0;
        private double _ControlWidth = 0;
        private Enumerations.CurrentDateView _DateView = Enumerations.CurrentDateView.Decade;
        private bool _AllowMonthNavigation = true;
        #endregion

        #region Properties
        public double ControlHeight
        {
            get { return _ControlHeight; }
            set
            {
                if (_ControlHeight != value)
                {
                    _ControlHeight = value;
                    OnPropertyChanged("ControlHeight");
                }
            }
        }
        public double ControlWidth
        {
            get { return _ControlWidth; }
            set
            {
                if (_ControlWidth != value)
                {
                    _ControlWidth = value;
                    OnPropertyChanged("ControlWidth");
                }
            }
        }
        public Enumerations.CurrentDateView DateView
        {
            get { return _DateView; }
            set
            {
                if (_DateView != value)
                {
                    _DateView = value;
                    OnPropertyChanged("DateView");
                }
            }
        }
        public bool AllowMonthNavigation
        {
            get { return _AllowMonthNavigation; }
            set
            {
                if (_AllowMonthNavigation != value)
                {
                    _AllowMonthNavigation = value;
                    OnPropertyChanged("AllowMonthNavigation");
                }
            }
        }
        #endregion

        #region Event Variables
        public event PropertyChangedEventHandler PropertyChanged;
        #endregion

        #region Methods
        #region OnPropertyChanged
        private void OnPropertyChanged(string PropertyName)
        {
            if (PropertyChanged != null)
                PropertyChanged.Invoke(this, new PropertyChangedEventArgs(PropertyName));
        }
        #endregion
        #endregion
    }
}
